<?php
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
include 'connection.php';
//this varible contains the array of existing users
//$existing_users=array('roshan','mike','jason'); 
//value got from the get metho
//$user_name=$_POST['user_name'];
//checking weather user exists or not in $existing_users array
$serial_number=$_POST['serial_number'];
$query = "SELECT COUNT(*) from warranties WHERE serialnumber='".$serial_number."'";
$results = mysql_query($query);
$result = mysql_fetch_row($results);
$availability = $result[0];
if ($availability != 0)
{
	//user name is not availble
	echo "no";
} 
else
{
	//user name is available
	echo "yes";
}
?>